<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>评论列表</title>
<link href="html/css/css.css" rel="stylesheet" type="text/css" />
<script Language=JavaScript src="html/js/functions.js"></script>
<script Language=JavaScript src="html/js/ajax.js"></script>

<script type="text/javascript">
// <![CDATA[
var listItem;
window.onload = function() {
	listItem = new list_item_onclick('list_item');
	listItem.init();
};

function selectSingle(obj)
{
	var id = listItem.get_input_value();
	
	if(id == 0)
	{
		msg_box('请至少选择一个');
		return false;
	}

	var id_arr = id.split(",");
	var id_num = id_arr.length
	
	if(id_num > 1)
	{
		msg_box('只能选择一个');
		return false;
	}
	
	obj.href += '&Id=' + id;
	
	return true;
}

function delMany(obj,url)
{
	var id = listItem.get_input_value();
	
	if(id == 0)
	{
		msg_box('请至少选择一条记录');
		return false;
	}
	
	var url = obj.href + '&Id=' + id;

	msg_box('您确定要删除这几条纪录吗？' , url);
	
	return false;
}

function selectMany(obj)
{
	var id = listItem.get_input_value();
	
	if(id == 0)
	{
		msg_box('请至少选择一个');
		return false;
	}
	
	obj.href += '&Id=' + id;
	return true;
}

// ]]>
</script>
</head>

<if $Msg>
<div id="msg"><img src="html/images/information.gif" width="16" height="16" align="absmiddle" /> [$Msg]</div>
</if>

<body style="height:auto;overflow-x:hidden">

<div class="top_tool">
<div>
<a href="?c=comment&d=passComment" onclick="return selectMany(this)"><img src="html/images/accept.gif" border="0" align="absmiddle" /> 审核</a>
<a href="?c=comment&d=editComment" onclick="return selectSingle(this);"><img src="html/images/pencil.gif" border="0" align="absmiddle" /> 编辑</a>
<a href="?c=comment&d=deleteComment" onclick="if(delMany(this)){return confirm('确认要删除选中信息吗？');}else{return false}"><img src="html/images/bin_closed.gif" border="0" align="absmiddle" /> 删除</a>
<a href="javascript:search_box(this);"><img src="html/images/search.gif" border="0" align="absmiddle" /> 搜索 </a>
</div>
</div>

<div class="search_box" id="search_box" style="display:none">
<form action="index.php" method="post" enctype="multipart/form-data" name="form" id="form" style="margin:0px">
<input name="c" type="hidden" value="comment"  />
<input name="d" type="hidden" value="main" />
<input name="referer" type="hidden" value="[$referer]" />
	<div style="clear:both"></div>
	<div class="item">
    关键字: <input name="Keywords" type="text" value="" />
    </div>
    <div class="item">
    <input name="" type="image" src="html/images/search_bottom.gif" style="width:auto;" align="absmiddle" />&nbsp;&nbsp;&nbsp;(再次按搜索可以关闭搜索框)
    </div>
    <div style="clear:both"></div>
</form>
</div>

<div class="list_intro"> 
	<div class="left">[ <b>评论列表</b> ]
  
  <if $btname>
  有关 <span style="color:#f90">《[$goods.name]》</span> 的评论
  </if>  
  </div>
    <div style="clear:both"></div>
</div>

<div class="list_menu">
<span class="checkbox"><input name="Id[]" type="checkbox" value="" onclick="listItem.click_all(this);" /></span>
<span class="type">序号</span>
<span class="tilte" style="width:300px;">评论内容</span>
<span class="type"></span>
<!--<span class="type">评论内容</span>
<span class="type">操作</span>-->
</div>
<div class="list_item" id="list_item">

<if $List>
<foreach name="List" key="key" var="var">
    <div>
    <span class="checkbox"><input name="Id[]" type="checkbox" value="[$var.Id]" /></span>
    <span class="type">[$var.Id]</span>
    <if $var.State == 1>
    <span class="tilte" style="width:450px;"><a href="index.php?c=comment&d=editComment&Id=[$var.Id]">[@htmlspecialchars(@CsubStr($var.Content,0,40))]</a></span>
    <else>
    <span class="tilte" style="width:450px;"><a href="index.php?c=comment&d=editComment&Id=[$var.Id]" style="color:#CCC;">[@htmlspecialchars(@CsubStr($var.Content,0,40))]</a></span>
    </if>
    <span class="type"></span>
	<!--<span class="type"><a href="../?c=index&d=bt&t=view&id=[$var.indexid]" target="_blank">浏览</a></span>-->
    <div style="clear:both; border:none"></div>
    </div>
</foreach>

<else>

    <div>
    <span class="time">没有找到相关信息！</span>
    <div style="clear:both; border:none"></div>
    </div>

</if>
      
<div class="page">
    记录数:[$ListNum]&nbsp;&nbsp;页次:[$CurrentPage]/[$PageNum]&nbsp;&nbsp;分页:[$PageList]&nbsp;</div>
</div>
</body>
</html>
